# #将浮点型数据转化为整型
str1 = int(3.6)
print(str1)
# #将布尔型数据转化为整型
str2 = int(False)
print(str2)
# #将整型数据转化为浮点型
str3 = float(3)
print(str3)
# #将字符串转化为浮点型
str4 = float("3.1415926")
print(str4)



# #对两个符合整型数据规范的字符串进行求和运算
str5 = "2"
str6 = "5"
sum = int(str5)+int(str6)
print(sum)

str7 = type(str5)
print(str7)
str8 = type(str6)
print(str8)
str9 = type(sum)
print(str9)


# #if语句
age = 18
if age >= 18:
    print("你成年啦！")



# #if...else语句
u_name = input("请输入用户名")
mima = input("请输入密码")
if u_name =="hello" and mima == "135":
    print("登陆成功！")
else:
    print("您输入的用户名或密码错误！")




# #判断回文数
zongshu = int(input("请输入四位数字"))
gewei = zongshu % 10
shiwei =( zongshu % 100 - gewei)//10
baiwei = (zongshu % 1000 -shiwei)//100
qianwie = (zongshu %10000 - baiwei)//1000
xinzongshu = gewei * 1000 + shiwei * 100 + baiwei * 10 + qianwie
if zongshu == xinzongshu:
    print(zongshu,"是回文数")
else:
    print(zongshu,"不是回文数")


#     # for语句
    word = "简单点"
    for c in word:
        print(c)

    for i in range(3):
        print("随随便便")


# #逢七拍手游戏
for num1 in range(1,100):
    if num1 % 7 ==0 or '7' in str(num1):
        print("*")
    else:
        print(num1)



# #while语句
i = 1
result = 1
while i <=10:
    result *= i
    i +=1
    print(result)


#while循环嵌套
a = 1
while a <=5:
    j = 1
    while j <= a:
        print("*",end='')
        j +=1
    print(end="\n")
    a +=1
    # print(a)
    # print(j)



#for循环嵌套
for b in range(1,6):
    for k in range(b):
        print("*",end='')
    print()